A typical digital camera includes an array of photosensors, with each photosensor sensitive to only a single color of light. For example, each photosensor is sensitive to one of red, green and blue light. During image acquisition, an image is focused on the photosensor array, and each photosensor measures or “samples” a single color of the image. If red-sensitive, green-sensitive and blue-sensitive photosensors can be located at each pixel, the photosensor array can acquire an image having “full color” at each pixel.
The photosensor arrays of certain digital cameras have only a single photosensor at each pixel location, and produce digital images having only a single color sample at each pixel. For example, a digital camera produces a digital image having one of red, green and blue sampled information at each pixel. Information about the other two colors at each pixel is missing. This undersampled digital image is referred to as a “mosaic” image.
A demosaicing algorithm may be used to transform an undersampled digital image into a digital image having full color information at each pixel value. A typical demosaicing algorithm interpolates the missing pixel information from the sampled pixel values in the mosaic image. A goal of demosaicing is reconstruction of an image that is perceived to be similar to the image focused on the photosensor array.
Edges and other abrupt photometric transitions present a particular problem to demosaicing. Simple demosaicing algorithms such as bilinear interpolation do not account for edges; consequently, color information at edges in the demosaiced image can be distorted (e.g., edges can be blurred).
More complex demosaicing algorithms try to account for edges. However, even the more complex demosaicing algorithms can introduce artifacts into demosaiced images. Zippering and fringing are typical artifacts at edges in demosaiced images. These artifacts can degrade image quality.
A typical digital camera can perform on-board demosaicing. This color at each pixel. However, memory and processing power of a typical digital camera are limited. The limited memory and processing power can constrain the complexity of the demosaicing algorithm and hamper the ability to account for edges and reduce artifacts at the edges during demosaicing.
A demosaicing algorithm that is simple and fast, and that reduces edge artifacts or blurring is desirable. Such a demosaicing algorithm is especially desirable for digital cameras.